package One;

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		int[] arr = new int[5];
		Scanner scan = new Scanner(System.in);
		while (scan.hasNextLine()) {
			String s = scan.nextLine();
			String[] str = s.split(" ");
			try {
				if (str[0].equals("arr")) {
					int a = Integer.parseInt(str[1]);
					arr[a] = 0;
				} else if (str[0].equals("null")) {
					throw new NullPointerException();
				} else if (str[0].equals("cast")) {
					throw new ClassCastException("java.lang.String cannot be cast to java.lang.Integer");
				} else if (str[0].equals("num")) {
					Integer.parseInt(str[1]);
				}
			} catch (Exception e) {
				System.out.println(e);
				//e.getStackTrace();
			}
		}
		scan.close();

	}
}
